using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public interface ParticleCreator {

	GameObject getParticle { get; }
	AudioClip getSound { get; }

	public void CreateParticleAt(Vector2 position,Angle angle,float scale=1) {
		GameObject particle = getParticle;
		if(particle) {
			GameObject newParticle = ParticleManager.Create(particle,position);
			newParticle.transform.rotation=angle.quaternion;
			newParticle.transform.localScale=Vector3.one*scale;
		}
		AudioClip sound = getSound;
		if(sound) {
			AudioPlayer.PlayAudio(position,sound,scale);
		}
	}

}
